<%@ Control Language="C#" AutoEventWireup="true" CodeFile="TourList.ascx.cs" Inherits="admin_TourList" %>
<script type="text/javascript">
    var the_url = "";
    function get_text() {
        the_url ="Default.aspx?ctrl=tour_list&search="+ document.getElementById("txtSearch").value;
    }
</script>
<table>
    <tr>
        <td style="width: 139px">
            <asp:Label ID="Label1" runat="server" Text="Enter text to search:"></asp:Label></td>
        <td style="width: 100px">
            <input id="txtSearch"  type="text" /></td>
        <td style="width: 100px">
            <a class="c_button" onclick="get_text();" href="javascript:location=the_url">Search</a>
        </td>
    </tr>
</table>
<asp:Label ID="Label2" runat="server" Text="List of tours:"></asp:Label><br />
<asp:GridView ID="dgrTour" runat="server" AutoGenerateColumns="False" CssClass="list_table">
    <Columns>
        <asp:BoundField DataField="Name" HeaderText="Name" />
        <asp:BoundField DataField="Region" HeaderText="Region" />
        <asp:BoundField DataField="Description" HeaderText="Description" />
        <asp:BoundField DataField="Price" HeaderText="Price" />
        <asp:BoundField DataField="Discount" HeaderText="Discount" />
        <asp:TemplateField HeaderText="State" ItemStyle-HorizontalAlign="center">          
            <ItemTemplate>
                <asp:CheckBox ID="chkState" runat="server" Checked='<%# Bind("State") %>'></asp:CheckBox>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField>
            <ItemTemplate>
                <a href="Default.aspx?ctrl=tour&mode=1&id=<%#Eval("Id") %>">Edit</a>
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
</asp:GridView>
<div id="pagin_bar"><asp:Label ID="lblPaging" runat="server"></asp:Label></div>
<script type="text/javascript" language="javascript">    
	window.location.hash="<%=ActiveAccording %>";
</script>